//package com.lzy.config;
//
//import com.lzy.properties.SystemProperties;
//import org.springframework.boot.context.properties.ConfigurationProperties;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//import java.util.concurrent.Executors;
//import java.util.concurrent.ScheduledExecutorService;
//
///**
// * @author lyw
// * @Date 2023/2/18-下午3:32
// */
//@Configuration
//public class TimerTaskPoolConfig {
//
//  private static final Integer cpuComputeTime = 30;
//  private static final Integer ioTime = 500;
//  private static final Integer nucleus = 4;
//
//  private static final Integer corePoolSize = nucleus * (1 + (ioTime / cpuComputeTime));
//
//  @Bean
//  @ConfigurationProperties(prefix = "system")
//  SystemProperties systemProperties() {
//    return new SystemProperties();
//  }
//
//  @Bean
//  public ScheduledExecutorService poll() {
//    return Executors.newScheduledThreadPool(corePoolSize);
//  }
//}
//
